<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.crishne.anwo.utill.WebUtil"%>
<%@page import="com.crishne.anwo.utill.CookieTool"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String msg = "";
if(request.getParameter("message") != null){
	msg = WebUtil.decodeURL(request.getParameter("message"));
}
String loginName = "";
String loginPwd = "";
Cookie cokLoginName = CookieTool.getCookieByName(request,"loginName");
Cookie cokLoginPwd = CookieTool.getCookieByName(request,"loginPwd");
if (cokLoginName != null && cokLoginPwd != null && cokLoginName.getValue()!=null && cokLoginPwd.getValue()!=null){
    loginName = cokLoginName.getValue();
    loginPwd = cokLoginPwd.getValue();
    //检查到客户端保存了用户的密码，进行该账户的验证
 	//这里要使用你自己的账户验证方法
    //如果账户验证成功，则跳转到登录成功的页面
    //如果账户验证失败，则
    
    //然后跳转到登录页面
}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
	<title>安我官网管理系统</title>
	<meta name="description" content="particles.js is a lightweight JavaScript library for creating particles.">
	<meta name="author" content="Vincent Garreau" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<link rel="stylesheet" media="screen" href="static/css/style.css">
	<script src="static/js/lib/require.js" data-main="static/js/bm/main" ></script>
  </head>
  
  <body class="login" id="currPage" data-pageJs="login">
   <div class="min">
	   <div class="login_min">
	   <form name="formLogin" action="loginSubmit.htm" id="formLogin" method="post">
	    <p class="title">安我官网管理系统</p>
	    <p id="alertMessage" class="yzwz"><%=msg %></p>
	   	<p><input class="text" type="text" name="userName" id="userName" value="<%=loginName %>"  placeholder="用户名" nullmsg="请输入用户名!"></p>
	   	<p><input class="text" name="password" type="password" id="password" value="<%=loginPwd %>"   placeholder="密码" nullmsg="请输入密码!"></p>
	   	<p><input name="remenberme" type="checkbox" <%=(null != loginPwd && !"".equals(loginPwd))?"checked":"" %>>记住密码</p>
	    <input class="dlu" id="loginbtn" type="button" value="登录">
	    </form>
	  	</div>
  <p class="jiewei">Copyright @ by ANDALL All Rights Reserved</p>
</div>
  </body>
</html>
